package com.mdlib.helper.ui.activity;

import android.content.Context;
import android.content.Intent;

import com.ljlib.core.base.BaseCommonActivity;
import com.ljlib.core.base.BaseFragment;
import com.mdlib.helper.model.entity.WebViewEntity;
import com.mdlib.helper.ui.UIHelper;
import com.mdlib.helper.ui.fragments.web.WebViewFragment;

/**
 * 作者：HQY on 16/12/15 21:00
 * 邮箱：hqy_xz@126.com
 */

public class WebViewActivity extends BaseCommonActivity {

    public static Intent newIntent(Context context, WebViewEntity webViewEntity) {
        Intent intent = new Intent(context, WebViewActivity.class);
        intent.putExtra(UIHelper.WEBVIEW, webViewEntity);
        return intent;
    }

    @Override
    protected BaseFragment getFirstFragment() {
        return WebViewFragment.newInstance((WebViewEntity) getIntent().getExtras().getSerializable(UIHelper.WEBVIEW));
    }
}
